package com.att.action;

import com.att.bean.LeaveClass1Bean;
import com.att.service.LeaveClass1Service;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("leaveClass1")
public class LeaveClass1Action {

    @Resource(name = "leaveClass1Service")
    private LeaveClass1Service leaveClass1Service;

    /**
     * Description: 计算项目
     */
    @RequestMapping("selectAll")
    @ResponseBody
    public Object selectAll(LeaveClass1Bean bean) {
        return leaveClass1Service.findLeaveClass1List(bean);
    }

    //修改
    @RequestMapping("update")
    @ResponseBody
    public String update(LeaveClass1Bean bean) {
        boolean flag = leaveClass1Service.update(bean);
        if (flag) {
            return "SUCCESS";
        }
        return "ERROR";
    }
}
